function pageHead() {
    //里面的id需按html的名字取哦,不然选中之后颜色不会变
    document.write("<div class=\"header_box\">\n" +
        "    <div class=\"header\">  \n" +
        "      <ul class=\"app-header\">\n" +
        "        <li class=\"app-header-menuicon\">\n" +
        "           <i class=\"layui-icon layui-icon-more-vertical\"></i>\n" +
        "        </li>\n" +
        "      </ul>\n" +
        "      <h1 class=\"logo\">\n" +
        "        <a href=\"#\">logo</a>\n" +
        "      </h1>\n" +
        "      <div class=\"nav\"  style=\"visibility: visible\">\n" +
        "        <a id='index' href=\"index.html\">首页</a>\n" +
        "        <a id='case' href=\"case.html\">案例</a>\n" +
        "        <a id='service' href=\"service.html\">服务</a>\n" +
        "        <a id='about' href=\"about.html\">关于</a>\n" +
        "      </div> \n" +
        "      <ul class=\"layui-nav header-down-nav\">\n" +
        "        <li id='index' class=\"layui-nav-item\"><a href=\"index.html\" class=\"active\">首页</a></li>\n" +
        "        <li id='case' class=\"layui-nav-item\"><a href=\"case.html\">案例</a></li>\n" +
        "        <li id='service' class=\"layui-nav-item\"><a href=\"service.html\">服务</a></li>\n" +
        "        <li id='about' class=\"layui-nav-item\"><a href=\"about.html\">关于</a></li>\n" +
        "      </ul> \n" +
        "    </div>\n" +
        "  </div>");
    //选中时给菜单标记颜色
    var path=window.location.toString();
    let number1 = path.indexOf(".html");
    let number = path.indexOf("web/")+4;
    var ids=null;
    if (number1== -1){
        ids= path.substr(number)
    }else {
        ids=path.substring(number,number1);
    }
    document.getElementById(ids).className='active';
}

function pageTail() {
    document.write("<div class=\"footer\">\n" +
        "    <div class=\"line\"></div>\n" +
        "    <p class=\"copyright\">\n" +
        "      @2016  ALL  SONGJU<br />\n" +
        "      E-MAIL:1016999146@qq.com<br />\n" +
        "      TEL:17685106227\n" +
        "    </p>\n" +
        "    <div class=\"icon_box\">\n" +
        "      <a href=\"#\"><i class=\"layui-icon layui-icon-login-wechat weixin-icon\"></i></a>\n" +
        "      <a href=\"#\"><i class=\"layui-icon layui-icon-login-weibo weibo-icon\"></i></a>\n" +
        "    </div>\n" +
        "  </div>");
}

